// messageBoxHelper.js

import { ElMessageBox  } from "element-plus";

export default function confirm(message, title = '确认') {
  return new Promise((resolve, reject) => {
    ElMessageBox.confirm(message, title, {
      confirmButtonText: '确定',
      cancelButtonText: '取消',
      type: 'warning'
    }).then(() => {
      resolve(true);
    }).catch(() => {
        console.log(reject);
      resolve(false);
    });
  });
}
